package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the REG_AERONAVES database table.
 * 
 */
@Entity
@Table(name="REG_AERONAVES")
public class RegAeronave implements Serializable {
	private static final long serialVersionUID = 1L;
	private RegAeronavePK id;
	private String agntSync;
	private String estado;
	private String modelo;
	private String numMatricula;
	private String serie;
	private Date tsUltSync;
	private Partida partida;
	private TmTipoAeronave tmTipoAeronave;

    public RegAeronave() {
    }


	@EmbeddedId
	public RegAeronavePK getId() {
		return this.id;
	}

	public void setId(RegAeronavePK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(nullable=false, length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(length=50)
	public String getModelo() {
		return this.modelo;
	}

	public void setModelo(String modelo) {
		this.modelo = modelo;
	}


	@Column(name="NUM_MATRICULA", nullable=false, length=15)
	public String getNumMatricula() {
		return this.numMatricula;
	}

	public void setNumMatricula(String numMatricula) {
		this.numMatricula = numMatricula;
	}


	@Column(length=20)
	public String getSerie() {
		return this.serie;
	}

	public void setSerie(String serie) {
		this.serie = serie;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Partida
    @ManyToOne
	@JoinColumn(name="REFNUM_PART", nullable=false, insertable=false, updatable=false)
	public Partida getPartida() {
		return this.partida;
	}

	public void setPartida(Partida partida) {
		this.partida = partida;
	}
	

	//bi-directional many-to-one association to TmTipoAeronave
    @ManyToOne
	@JoinColumn(name="COD_TIPO_AERONAVE")
	public TmTipoAeronave getTmTipoAeronave() {
		return this.tmTipoAeronave;
	}

	public void setTmTipoAeronave(TmTipoAeronave tmTipoAeronave) {
		this.tmTipoAeronave = tmTipoAeronave;
	}
	
}